//
//  AES_Base64VC.m
//  RSTools
//
//  Created by thinkjoy on 2017/9/12.
//  Copyright © 2017年 杜瑞胜. All rights reserved.
//

#import "AES_Base64VC.h"
#import "SecurityUtil.h"

@interface AES_Base64VC ()
@property (weak, nonatomic) IBOutlet UITextView *mainTextView;
@end

@implementation AES_Base64VC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.mainTextView.text  =   @"cCNSJStl0NceMf+N3KKcI1NJpBX0KTdepNzZs373q1jdMb4ubcDRCEi2yQW9 UpBPvZEiSOWVZ+9tVlQ/rudkYUWMyk9DZV5b/A4FG+8dzEXE1EPIUy4ZrwDH cn4eF3I2yrehv7BTNC+O/Sh9ylrJYK1A0p0zgI17NljP932+yv/4x/H9BBcb AxHzXZKnJo/37W2fnH6Lr2llN8FLfS9KU5+4/HdWgguwtHS21KvWkKk=";
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//加密
- (IBAction)clickEncode:(id)sender
{
    self.mainTextView.text = [SecurityUtil encryptAESData:self.mainTextView.text];
}

//解密
- (IBAction)clickDecode:(id)sender
{
    self.mainTextView.text = [SecurityUtil decryptAESData:self.mainTextView.text];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
